const koa = require('koa-router')
const authRouter = new koa
const { login,create,pvmsg,pvwsmsg } = require('../controller/auth.controller')
const {verifyLogin,verifyCreate,getwspvmsg,getpvmsg} = require('../middleware/auth.middleware')
 
authRouter.post('/login', verifyLogin, login)
authRouter.post('/create',verifyCreate, create)

//查询当前用户的即时聊天私信数量 
authRouter.get('/wspvmsg/:id',getwspvmsg,pvwsmsg)
//获取当前用户私信
authRouter.get('/pvmsg/:id',getpvmsg,pvmsg)

module.exports = authRouter;